﻿package mortal.game.view.shopMall.view
{
    import Message.DB.Tables.*;
    import com.mui.controls.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class ShopGroupTabCellRender extends GCellRenderer
    {
        private var _tabName:GImageBitmap;
        private var _tshop:TShop;
        private var _selectBg:GImageBitmap;

        public function ShopGroupTabCellRender()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._selectBg = UIFactory.gImageBitmap(ImagesConst.ShopSelectBg, 0, 0, this);
            this._tabName = UIFactory.gImageBitmap("", 3, 8, this);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._tabName.dispose(param1);
            this._tabName = null;
            this._selectBg.dispose(param1);
            this._selectBg = null;
            this._tshop = null;
            super.disposeImpl(param1);
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            this._tshop = param1.info;
            this._tabName.imgUrl = "shopGroupTab_" + this._tshop.unit + ".png";
            return;
        }// end function

        override public function set selected(param1:Boolean) : void
        {
            super.selected = param1;
            this._selectBg.visible = this.selected;
            return;
        }// end function

    }
}
